home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / LANG / C / LIB / DESK / CORE / Desk / h_doc / Jump < prev    next >
Text File  |  1996-05-21  |  3KB  |  87 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    Jump.h
  12.     Author:  Copyright © 1995 Julian Smith, Martin Ebourne, Jos Horsmeier
  13.                               Paul Field.
  14.     Version: 1.02 (07 Nov 1995)
  15.     Purpose: Easy use of set/longjmp.
  16.     History: 1.00 8 Sep 1995
  17.              1.01 29 Sep 1995 JS Added Desk_JumpAuto_TryCatch
  18.              1.02 07 Nov 1995 JS Changed Desk_JumpAuto_TryCatch slightly - you
  19.                                  *shouldn't* put a ';' after the macro now.
  20.              1.10 29 Nov 1995    Changed Jump to use a struct in SDLS 
  21.                                  compiles.
  22.                                  Borrowed some macro ideas from PF, which 
  23.                                  in turn were based on code by ME and JH.
  24. */
  25.  
  26. #ifndef __Desk_Jump_h
  27. #define __Desk_Jump_h
  28.  
  29. #ifdef __cplusplus
  30.     extern "C" {
  31. #endif
  32.  
  33. #ifndef __Desk_JumpRaw_h
  34.     #include "Desk.JumpRaw.h"
  35. #endif
  36.  
  37. #ifndef __Desk_Error2_h
  38.     #include "Desk.Error2.h"
  39. #endif
  40.  
  41. #ifndef __Desk_Debug_h
  42.     #include "Desk.Debug.h"
  43. #endif
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51. Desk_error2_block    *Desk_JumpAuto_Error2Handler( Desk_error2_block *error);
  52. /*
  53. A simple error handler which simply calls Desk_JumpAuto_Throw( (int) error)
  54. if in a try-catch loop, otherwise it calls Desk_Error2_Exit.
  55.  
  56. 'error' is passed in the call to Desk_JumpAuto_LongJmp, and so will appear to
  57. catch code as 'Desk_jumpauto_val'. You can alternatively use
  58. Desk_jumpauto_lasterror.
  59.  
  60. To always use jumpauto, do 'Desk_Error2_SetHandler( Desk_JumpAuto_Error2Handler);'
  61.  */
  62.  
  63.  
  64. extern Desk_error2_block*    Desk_jumpauto_lasterror;
  65. /*
  66. This is set by Desk_JumpAuto_Error2Handler to be the last Desk_error2_block sent
  67. to (Desk_JumpAuto_Error2Handler.
  68.  
  69. This means that catch code can use either '(Desk_error2_block*) Desk_jumpauto_val'
  70. or 'Desk_jumpauto_lasterror' - they will be the same.
  71.  
  72. [
  73. Actually, Desk_jumpauto_lasterror has been added to allow the non-Desktop
  74. parts of DeskLib to be compiled on non-RISC OS machines where ints can
  75. be smaller than pointers, so that Desk_jumpauto_val isn't large enough to
  76. contain a pointer.
  77.  ]
  78.  */
  79.  
  80.  
  81.  
  82. #ifdef __cplusplus
  83.     }
  84. #endif
  85.  
  86. #endif
  87.